<!DOCTYPE html>
<html>
<head>
    <script src="lib/easeljs-0.7.1.min.js" type="text/javascript"></script>
    <script src="lib/tweenjs-0.5.1.min.js" type="text/javascript"></script>
	<title></title>
</head>
<body onload="init()">
    <canvas id="canvas" width="600" height="600" style="border: 1px solid #ccc;"></canvas>
</body>
</html>

<script type="text/javascript">
	var stage;
	function init() {
		stage = new createjs.Stage(document.getElementById('canvas'));
		createjs.Ticker.addEventListener('tick',function(e){
			stage.update()
		})
		createjs.Ticker.setFPS(60);
		drawButterflies()
	}
	function drawButterflies(){
		var imagPath = 'images/butterfly.png';
		butterfly1 = new createjs.Bitmap(imagPath);
		butterfly2 = new createjs.Bitmap(imagPath);
		butterfly2.x = 90;
		butterfly2.y = 40;
		stage.addChild(butterfly1,butterfly2);
		stage.update();
		
		var timer = setInterval(swapbutterfly,100)
		//自己会动的蝴蝶

	}

	function moveButterflies() {
		butterfly2.x+=10;
		butterfly2.y+=10;
	}
</script>